<template>
	<view class="content" v-if="detail">
		<view class="title">
			{{detail.title}}
		</view>
		<view class="time_view f">
			<view class="time">
				发布时间：{{detail.createtime}}
			</view>
			<view class="view">
				浏览量：{{detail.view_counts}}
			</view>
		</view>
		<u-parse :content="detail.content"></u-parse>
	</view>
</template>

<script>
	import { notice_detail } from '@/api/page.js'
	export default {
		data() {
			return {
				detail: ''
			}
		},
		onLoad(e) {
			this.get_detail(e.id)
		},
		methods: {
			get_detail(id) {
				notice_detail({ id }).then(res => {
					console.log(res)
					this.detail = res.data
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		padding: 30rpx;

		.title {
			font-weight: 600;
			font-size: 40rpx;
			color: #232323;
		}

		.time_view {
			margin-top: 20rpx;
			margin-bottom: 20rpx;
			font-weight: 400;
			font-size: 24rpx;
			color: #666666;

			.view {
				margin-left: 20rpx;
			}
		}
	}
</style>